# This contains only Bionic-specific jobs
# These are run as part of runtime-extra-platforms by default.
# But can also be triggered manually via `runtime-linuxbionic` name
#   /azp run runtime-linuxbionic

parameters:
  isExtraPlatformsBuild: false
  isLinuxBionicOnlyBuild: false
  isRollingBuild: false

jobs:

#
# Build the whole product using Mono for Android Linux with Bionic libc
#
- template: /eng/pipelines/common/platform-matrix.yml
  parameters:
    jobTemplate: /eng/pipelines/common/global-build-job.yml
    helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
    buildConfig: Release
    runtimeFlavor: mono
    isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
    isLinuxBionicOnlyBuild: ${{ parameters.isLinuxBionicOnlyBuild }}
    platforms:
      - linux_bionic_arm64
      - linux_bionic_x64
    variables:
      - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
        - name: _HelixSource
          value: pr/dotnet/runtime/$(Build.SourceBranch)
      - ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
        - name: _HelixSource
          value: ci/dotnet/runtime/$(Build.SourceBranch)
      - name: timeoutPerTestInMinutes
        value: 60
      - name: timeoutPerTestCollectionInMinutes
        value: 180
    jobParameters:
      testGroup: innerloop
      targetRid: linux-bionic-x64
      nameSuffix: AllSubsets_Mono
      buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true
      timeoutInMinutes: 480
      # extra steps, run tests
      postBuildSteps:
        - template: /eng/pipelines/libraries/helix.yml
          parameters:
            creator: dotnet-bot
            testRunNamePrefixSuffix: Mono_$(_BuildConfig)_LinuxBionic
